from khronos import Atomic

class Sink(Atomic):
    def __init__(self, name=None, parent=None, priority=None):
        Atomic.__init__(self, name, parent, priority)
        self.__received = 0
        
    def initializer(self):
        self.__received = 0
        
    def receive(self, _, __):
        self.__received += 1
        
    def status(self):
        return "received %d objects" % (self.__received,)
        
